package com.neuedu.corejava.ch10test;




public class Fruit implements Comparable<Fruit>{

	private String slyte;

	public Fruit(String slyte) {
		super();
		this.slyte = slyte;
	}

	public Fruit() {
		super();
	}

	public String getSlyte() {
		return slyte;
	}

	public void setSlyte(String slyte) {
		this.slyte = slyte;
	}

	@Override
	public String toString() {
		return "Fruit [slyte=" + slyte + "]";
	}

	@Override
	public int compareTo(Fruit o) {
		return slyte.hashCode()-o.getSlyte().hashCode();
	}
}
